home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1999 November / SOTMC_Nov1999-Ultimate.iso / mac / REALbasic ƒ / Examples / Techniques / Examples by Thomas Tempelmann / FAQs from RB-NUG mailing list / function parameters / function parameters.rsrc
MacOS Resource Fork  |  1999-07-06  |  1.8 KB  |  [clpt/drag]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacOS Resource Fork (archive/rsrc).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert MacOS Resource Fork (archive/rsrc) magic Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert BeOS Resource Data (archive/beOSResourceData) ext Unsupported
1% dexvert AppleSingle (archive/appleSingle) fallback Supported
1% dexvert TTComp Archive (archive/ttcomp) fallback Supported
100% file AppleDouble encoded Macintosh file default
99% file data default
66% TrID Mac AppleDouble encoded default
33% TrID TTComp archive compressed (bin-2K) default (weak)
1% dearkID deark: applesd (AppleDouble header file) default (weak)
100% lsar AppleSingle default


id metadata
keyvalue
macFileType[clpt]
macFileCreator[drag]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 05 16 07 00 02 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 02 00 00 00 09 00 00 |........|........|
|00000020| 00 32 00 00 00 20 00 00 | 00 02 00 00 00 52 00 00 |.2... ..|.....R..|
|00000030| 06 b8 63 6c 70 74 64 72 | 61 67 01 00 00 00 00 00 |..clptdr|ag......|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 01 00 00 00 | 06 4a 00 00 05 4a 00 00 |........|.J...J..|
|00000060| 00 6e bb 11 8b ce 61 1d | 0d 01 ca 1c fe e2 e4 1a |.n....a.|........|
|00000070| 7c 68 60 2f 42 c0 72 08 | 13 1e 10 c0 a1 9c 11 0b ||h`/B.r.|........|
|00000080| f3 2c 74 b8 30 cb de 3d | 33 fa 98 c9 e2 00 b0 dc |.,t.0..=|3.......|
|00000090| 87 0b 09 07 26 0c d9 20 | 81 3f 0e 46 e4 ff 05 d8 |....&.. |.?.F....|
|000000a0| 04 32 9c c5 8b 09 0c 64 | bc c6 71 d9 47 90 02 47 |.2.....d|..q.G..G|
|000000b0| ea 04 a9 e0 64 ca 79 fa | 0a 0c 1c e7 f2 cb 17 0a |....d.y.|........|
|000000c0| e4 e6 6d 6c 28 10 27 c2 | 83 08 3f 48 2d 70 a0 a7 |..ml(.'.|..?H-p..|
|000000d0| bf 94 fb 0e 60 28 20 f4 | da b9 2f d0 72 75 c0 80 |....`( .|../.ru..|
|000000e0| d0 e6 85 02 17 06 8a 54 | 7b f3 83 03 ae 78 7c 16 |.......T|{....x|.|
|000000f0| e1 20 ef c0 59 73 b9 a8 | e1 13 a0 68 13 b3 06 69 |. ..Ys..|...h...i|
|00000100| 35 b2 8b ea e0 42 61 ae | 5c c1 c8 25 22 4f e0 87 |5....Ba.|\..%"O..|
|00000110| 41 ab 2e 8d a1 46 0d 94 | 3e 77 dc 80 e5 fa 12 4e |A....F..|>w.....N|
|00000120| eb 87 02 71 af ce 95 77 | 41 c0 02 06 ab 52 ff 69 |...q...w|A....R.i|
|00000130| 35 a6 4f 38 0d a8 2d a5 | de c3 00 75 25 46 a4 fc |5.O8..-.|...u%F..|
|00000140| 59 f8 59 0e f6 ec df ac | 5a 21 50 13 1b 38 ea e3 |Y.Y.....|Z!P..8..|
|00000150| 08 6a 00 00 04 d0 47 75 | 79 72 65 6e 20 47 20 48 |.j....Gu|yren G H|
|00000160| 6f 77 65 20 77 72 6f 74 | 65 3a 0d 0d 3e 57 61 79 |owe wrot|e:..>Way|
|00000170| 20 62 61 63 6b 20 77 68 | 65 6e 2c 20 74 68 65 72 | back wh|en, ther|
|00000180| 65 20 77 61 73 20 64 69 | 73 63 75 73 73 69 6f 6e |e was di|scussion|
|00000190| 20 61 62 6f 75 74 20 6d | 61 6b 69 6e 67 20 6d 65 | about m|aking me|
|000001a0| 74 68 6f 64 73 20 61 20 | 70 61 72 61 6d 65 74 65 |thods a |paramete|
|000001b0| 72 20 74 79 70 65 2e 0d | 3e 43 6f 6e 73 69 64 65 |r type..|>Conside|
|000001c0| 72 20 74 68 69 73 20 61 | 20 66 65 61 74 75 72 65 |r this a| feature|
|000001d0| 20 72 65 71 75 65 73 74 | 20 28 61 6c 6f 6e 67 20 | request| (along |
|000001e0| 77 69 74 68 20 63 6c 61 | 73 73 20 70 61 72 61 6d |with cla|ss param|
|000001f0| 65 74 65 72 73 20 61 6e | 64 20 6d 65 74 68 6f 64 |eters an|d method|
|00000200| 73 29 2e 0d 0d 54 68 61 | 74 27 73 20 65 78 61 63 |s)...Tha|t's exac|
|00000210| 74 6c 79 20 77 68 61 74 | 20 43 6c 61 73 73 20 49 |tly what| Class I|
|00000220| 6e 74 65 72 66 61 63 65 | 73 20 61 72 65 20 66 6f |nterface|s are fo|
|00000230| 72 21 0d 0d 45 78 61 6d | 70 6c 65 3a 0d 0d 43 72 |r!..Exam|ple:..Cr|
|00000240| 65 61 74 65 20 61 20 43 | 6c 61 73 73 20 49 6e 74 |eate a C|lass Int|
|00000250| 65 72 66 61 63 65 2c 20 | 63 61 6c 6c 20 69 74 20 |erface, |call it |
|00000260| 22 44 6f 61 62 6c 65 22 | 2c 20 61 6e 64 20 61 64 |"Doable"|, and ad|
|00000270| 64 20 74 68 65 0d 66 6f | 6c 6c 6f 77 69 6e 67 20 |d the.fo|llowing |
|00000280| 6d 65 74 68 6f 64 20 64 | 65 66 69 6e 69 74 69 6f |method d|efinitio|
|00000290| 6e 20 74 6f 20 69 74 3a | 0d 0d 20 20 53 75 62 20 |n to it:|.. Sub |
|000002a0| 44 6f 49 74 28 29 0d 0d | 54 68 65 6e 20 63 72 65 |DoIt()..|Then cre|
|000002b0| 61 74 65 20 61 20 63 6c | 61 73 73 20 77 69 74 68 |ate a cl|ass with|
|000002c0| 20 74 68 65 20 6e 61 6d | 65 20 22 44 6f 69 6e 67 | the nam|e "Doing|
|000002d0| 49 74 4d 79 57 61 79 22 | 2c 20 61 64 64 20 74 68 |ItMyWay"|, add th|
|000002e0| 65 20 6e 61 6d 65 0d 22 | 44 6f 61 62 6c 65 22 20 |e name."|Doable" |
|000002f0| 74 6f 20 69 74 73 20 49 | 6e 74 65 72 66 61 63 65 |to its I|nterface|
|00000300| 73 20 70 72 6f 70 65 72 | 74 69 65 73 2c 20 61 6e |s proper|ties, an|
|00000310| 64 20 74 68 65 6e 20 69 | 6d 70 6c 65 6d 65 6e 74 |d then i|mplement|
|00000320| 20 74 68 65 0d 44 6f 49 | 74 20 66 75 6e 63 74 69 | the.DoI|t functi|
|00000330| 6f 6e 2c 20 6c 69 6b 65 | 20 74 68 69 73 3a 0d 0d |on, like| this:..|
|00000340| 53 75 62 20 44 6f 49 74 | 28 29 0d 20 20 4d 73 67 |Sub DoIt|(). Msg|
|00000350| 42 6f 78 20 22 54 68 61 | 74 27 73 20 6d 79 20 77 |Box "Tha|t's my w|
|00000360| 61 79 2e 22 0d 45 6e 64 | 20 53 75 62 0d 0d 28 59 |ay.".End| Sub..(Y|
|00000370| 6f 75 20 63 61 6e 20 6e | 6f 77 20 6f 66 20 63 6f |ou can n|ow of co|
|00000380| 75 72 73 65 2c 20 63 72 | 65 61 74 65 20 6d 6f 72 |urse, cr|eate mor|
|00000390| 65 20 63 6c 61 73 73 65 | 73 20 6c 69 6b 65 20 74 |e classe|s like t|
|000003a0| 68 69 73 2c 20 77 69 74 | 68 20 64 69 66 66 65 72 |his, wit|h differ|
|000003b0| 65 6e 74 0d 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |ent.impl|ementati|
|000003c0| 6f 6e 73 20 6f 66 20 22 | 44 6f 49 74 22 29 0d 0d |ons of "|DoIt")..|
|000003d0| 4e 6f 77 2c 20 69 6d 61 | 67 69 6e 65 20 79 6f 75 |Now, ima|gine you|
|000003e0| 20 68 61 76 65 20 61 20 | 66 75 6e 63 74 69 6f 6e | have a |function|
|000003f0| 20 73 6f 6d 65 77 68 65 | 72 65 20 74 68 61 74 20 | somewhe|re that |
|00000400| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 70 61 73 73 |you want| to pass|
|00000410| 20 61 0d 6d 65 74 68 6f | 64 20 74 6f 20 65 78 65 | a.metho|d to exe|
|00000420| 63 75 74 65 2e 20 54 68 | 61 74 20 77 6f 75 6c 64 |cute. Th|at would|
|00000430| 20 74 68 65 6e 20 6c 6f | 6f 6b 20 6c 69 6b 65 20 | then lo|ok like |
|00000440| 74 68 69 73 3a 0d 0d 53 | 75 62 20 44 6f 54 68 69 |this:..S|ub DoThi|
|00000450| 73 20 28 70 65 72 66 6f | 72 6d 20 61 73 20 44 6f |s (perfo|rm as Do|
|00000460| 61 62 6c 65 29 0d 20 20 | 4d 73 67 42 6f 78 20 22 |able). |MsgBox "|
|00000470| 50 72 65 73 73 20 4f 4b | 20 74 6f 20 6c 65 74 20 |Press OK| to let |
|00000480| 6d 65 20 70 65 72 66 6f | 72 6d 20 77 68 61 74 20 |me perfo|rm what |
|00000490| 79 6f 75 20 77 61 6e 74 | 20 6d 65 20 74 6f 2e 2e |you want| me to..|
|000004a0| 2e 22 0d 20 20 70 65 72 | 66 6f 72 6d 28 29 0d 45 |.". per|form().E|
|000004b0| 6e 64 20 53 75 62 0d 0d | 46 69 6e 61 6c 6c 79 2c |nd Sub..|Finally,|
|000004c0| 20 68 61 76 65 20 69 74 | 20 65 78 65 63 75 74 65 | have it| execute|
|000004d0| 64 20 6c 69 6b 65 20 74 | 68 69 73 3a 0d 0d 20 20 |d like t|his:.. |
|000004e0| 44 69 6d 20 6f 6e 65 57 | 61 79 54 6f 44 6f 49 74 |Dim oneW|ayToDoIt|
|000004f0| 20 61 73 20 44 6f 61 62 | 6c 65 0d 20 20 6f 6e 65 | as Doab|le. one|
|00000500| 57 61 79 54 6f 44 6f 49 | 74 20 3d 20 4e 65 77 20 |WayToDoI|t = New |
|00000510| 44 6f 69 6e 67 49 74 4d | 79 57 61 79 28 29 0d 20 |DoingItM|yWay(). |
|00000520| 20 44 6f 54 68 69 73 20 | 28 6f 6e 65 57 61 79 54 | DoThis |(oneWayT|
|00000530| 6f 44 6f 49 74 29 0d 0d | 49 74 20 6c 6f 6f 6b 73 |oDoIt)..|It looks|
|00000540| 20 61 20 62 69 74 20 63 | 6f 6d 62 65 72 73 6f 6d | a bit c|ombersom|
|00000550| 65 2c 20 62 75 74 20 74 | 68 61 74 27 73 20 74 68 |e, but t|hat's th|
|00000560| 65 20 77 61 79 20 74 6f | 20 64 6f 20 69 74 20 69 |e way to| do it i|
|00000570| 6e 20 4f 4f 2d 6c 61 6e | 67 75 61 67 65 73 0d 61 |n OO-lan|guages.a|
|00000580| 6e 64 20 74 68 69 73 20 | 69 73 20 61 20 63 6c 65 |nd this |is a cle|
|00000590| 61 6e 20 61 6e 64 20 6e | 69 63 65 20 77 61 79 20 |an and n|ice way |
|000005a0| 6f 6e 63 65 20 79 6f 75 | 20 67 65 74 20 75 73 65 |once you| get use|
|000005b0| 64 20 74 6f 20 69 74 2e | 0d 41 64 64 69 6e 67 20 |d to it.|.Adding |
|000005c0| 6f 74 68 65 72 20 74 65 | 63 68 6e 69 71 75 65 73 |other te|chniques|
|000005d0| 2c 20 6c 69 6b 65 20 50 | 61 73 63 61 6c 2c 20 4d |, like P|ascal, M|
|000005e0| 6f 64 75 6c 61 2d 32 2c | 20 43 20 6f 66 66 65 72 |odula-2,| C offer|
|000005f0| 2c 20 77 6f 75 6c 64 20 | 6e 6f 74 0d 6c 6f 6f 6b |, would |not.look|
|00000600| 20 67 6f 6f 64 20 69 6e | 20 74 68 69 73 20 4f 4f | good in| this OO|
|00000610| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 0d 0d 54 | environ|ment...T|
|00000620| 68 6f 6d 61 73 0d 00 00 | 00 16 00 01 00 00 00 00 |homas...|........|
|00000630| 00 0b 00 09 00 04 00 00 | 00 09 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 30 00 00 00 01 | 00 00 00 04 00 00 00 00 |...0....|........|
|00000650| 00 00 00 02 54 45 58 54 | 00 00 01 00 00 00 00 00 |....TEXT|........|
|00000660| 00 00 00 00 73 74 79 6c | 00 00 01 00 00 00 00 00 |....styl|........|
|00000670| 00 00 00 00 00 00 00 24 | 00 00 00 05 00 01 04 07 |.......$|........|
|00000680| 00 30 00 32 01 99 02 4d | 00 03 00 00 00 00 01 70 |.0.2...M|.......p|
|00000690| 8c 00 00 00 09 99 91 e0 | 00 00 00 00 00 00 01 00 |........|........|
|000006a0| 00 00 06 4a 00 00 05 4a | 00 00 00 6e 09 75 f7 00 |...J...J|...n.u..|
|000006b0| 33 6a 00 00 00 1c 00 6e | 00 03 54 45 58 54 00 00 |3j.....n|..TEXT..|
|000006c0| 00 22 73 74 79 6c 00 00 | 00 2e 64 72 61 67 00 00 |."styl..|..drag..|
|000006d0| 00 3a 6b 77 73 74 00 00 | 00 46 01 00 ff ff 00 00 |.:kwst..|.F......|
|000006e0| 00 00 00 00 00 00 01 00 | ff ff 00 00 04 d4 00 00 |........|........|
|000006f0| 00 00 00 80 ff ff 00 00 | 04 ee 00 00 00 00 bf 4c |........|.......L|
|00000700| ff ff 00 00 05 22 00 e2 | 67 58 |....."..|gX |
+--------+-------------------------+-------------------------+--------+--------+